/**
 * name: 与组件或页面的名称相同(页面缓存)
 * meta: {
 *  keepAlive: 是否缓存页面 true 缓存
 *  hideMenu: 隐藏在顶部栏/显示的菜单, true 隐藏
 *  hideModule: 是否隐藏模块, true 隐藏(只需在组第一个路由设置)
 *  needVerify: 是否需要认证, true 代表 rz_status == 4 才可进入
 *  icon: 该页面在左侧菜单、顶部栏处显示的图标
 *  dropMenu: 顶部菜单是否下拉 true 下拉
 * }
 *  group: 侧菜单是否分组,, groupIcon: 'icon-vr_1' 填入分组名称,分组名称相同则为一组
 *  groupIcon: 若分组, 分组图标必填
 */

export const appRouters = [
  {
    path: "*",
    meta: { title: "错误-404", hideMenu: true },
    redirect: "/error-404"
  },
  {
    path: "/login",
    name: "login",
    meta: { title: "login - 登录", hideMenu: true },
    component: () => import("@/views/login/index")
  },
  {
    path: "/signup",
    name: "signup",
    meta: { title: "signup - 注册", hideMenu: true },
    component: () => import("@/views/signup/index")
  },
  {
    path: "/forget",
    name: "forget",
    meta: { title: "forget - 找回密码", hideMenu: true },
    component: () => import("@/views/forget-password/index")
  },
  {
    path: "/error-404",
    name: "error-404",
    meta: { title: "404-页面不存在", hideMenu: true },
    component: () => import("@/views/error/404")
  },
  {
    path: "/home",
    name: "home",
    meta: { title: "首页", hideMenu: true },
    component: () => import("@/views/main-view/Index")
  },
  {
    path: '/',
    redirect: {
      name: 'home',
    }
  },
  {
    path: "/product",
    name: "product",
    meta: { title: "产品", hideMenu: true },
    component: () => import("@/views/main-view/Product")
  },
  {
    path: "/panomarket",
    name: "panomarket",
    meta: { title: "作品市场", hideMenu: true },
    component: () => import("@/views/main-view/Panomarket")
  },
  {
    path: "/panomarket-detail/:id",
    name: "panomarketDetail",
    meta: { title: "作品市场详情", hideMenu: true },
    component: () => import("@/views/main-view/PmarketDetail")
  },
  {
    path: "/author",
    name: "author",
    meta: { title: "作者", hideMenu: true },
    component: () => import("@/views/main-view/Author")
  },
  {
    path: "/author-detail/:id",
    name: "authorDetail",
    meta: { title: "作者详情", hideMenu: true },
    component: () => import("@/views/main-view/AuthorDetail")
  },
  {
    path: "/news",
    name: "news",
    meta: { title: "新闻资讯", hideMenu: true },
    component: () => import("@/views/main-view/News")
  },
  {
    path: "/news-detail/:id",
    name: "newsDetail",
    meta: { title: "资讯详情", hideMenu: true },
    component: () => import("@/views/main-view/NewsDetail")
  },
  {
    path: "/about",
    name: "about",
    meta: { title: "关于我们", hideMenu: true },
    component: () => import("@/views/main-view/About")
  },
  {
    path: "/panomap",
    name: "panomap",
    meta: { title: "全景地图", hideMenu: true },
    component: () => import("@/views/main-view/Panomap")
  },
];

// console.log(appRouters)

export const routers = [...appRouters];
